<!DOCTYPE html >
<html>
<head>
<meta name="Generator" content="TPshop v1.1" />
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width">
<title>添加话术</title>
<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
<!-- <link rel="stylesheet" href="../../css/footer.css"> -->
<link rel="stylesheet" href="../../css/font_my/iconfont.css">

<style type="text/css">
	body,html{
		width: 100%;
		height: 100%;
		margin: 0;
		padding: 0;
		overflow-x: hidden;
		color:#555555;
		background: #eee;
	}
	p{
		margin: 0;
	}
	.bian{
		width: calc(100% - 20px);
		padding: 0 10px;
	}
	.trickAddYin{
		display: flex;
		background: #eee;
		line-height: 50px;
	}
	.trickAddYinL{
		width: calc(100% - 90px);
		font-weight: bold;
		font-size: 16px
	}
	.trickAddYinR{
		width: 90px;
		text-align: right;
	}
	textarea{
		width: 100%;
		height: 80px;
		resize: none;
		border:none;
	}
	.yanse{
		background: #fff
	}
	
	.trickAddBot{
		padding: 10px 10px;
	}
	input{
		width: 100%;
		height: 35px;
		border:none;
		outline:none;
	}
	.trickAddBtn{
		width: calc(100% - 20px);
		line-height: 35px;
		margin: 30px 10px;
		text-align: center;
		color: #FFF;
		background: #4f81d4;
		border-radius: 3px;
	}
	





</style>

</head>
<body>
	<div class="trickAdd">
		<div class="bian trickAddYin">
			<div class="trickAddYinL">话术内容</div>
			<div class="trickAddYinR"><span class="AddNK">0</span>/300</div>
		</div>
		<div class="bian yanse">
			<textarea name="" id="aa" placeholder="请输入话术内容" maxlength="300"></textarea>
		</div>
		<div class="bian trickAddYin">
			<div class="trickAddYinL">关键字</div>
			<div class="trickAddYinR"><span class="AddFK">0</span>/8</div>
		</div>
		<div class="bian yanse trickAddBot">
			<input type="text" placeholder="请输入关键字" class="trickAddF" maxlength="8">
		</div>
		<div class="trickAddBtn">保存</div>
	</div>

<script src='../../js/jquery.js'></script>
<script type="text/javascript">
	$('#aa').bind('input propertychange', function() {
        var $this = $(this);
        var text_length = $this.val().length;//获取当前文本框的长度
        $(".AddNK").html(text_length)
        if(text_length >=300){
        	alert("最多只能输入300个字符")
        }
    });
    $('.trickAddF').bind('input propertychange', function() {
        var $this = $(this);
        var text_length = $this.val().length;//获取当前文本框的长度
        $(".AddFK").html(text_length)
        if(text_length >=8){
        	alert("最多只能输入8个字符")
        }
    });
    $(".trickAddBtn").click(function(){
    	var aa = $('#aa').val()
    	var trickAddF = $('.trickAddF').val()
    	console.log(aa,trickAddF)
    })
	// console.log($)

</script>
</body>
</html>